﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace SQLDeployAnything.Data.Deployment
{
    public class Step : INotifyPropertyChanged
    {
        private string mName;
        private int mSequence;
        private bool mParallelExecution;

        public string StepName 
        { 
            get { return mName; }
            set
            {
                mName = value;
                OnPropertyChanged("StepName");
            }
        }

        public int StepNumber 
        { 
            get { return mSequence; }
            set 
            { 
                mSequence = value;
                OnPropertyChanged("StepNumber");
            }
        }

        public bool AllowTasksToRunInParallel 
        { 
            get { return mParallelExecution; }
            set 
            { 
                mParallelExecution = value;
                OnPropertyChanged("AllowTasksToRunInParallel");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected internal void OnPropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(name));
        }
    }
}
